This page last changed on Nov 27, 2007.
Creating SOAP Handlers for Imported WSDLsWhen you import metadata from web services for AquaLogic Data Services Platform, you can create SOAP handler for intercepting SOAP requests and responses. The handler will be invoked when a web service method is called. You can chain handlers that are invoked one after another in a specific sequence by defining the sequence in a configuration file. To create and chain handlers, the following steps are involved:
Create a Java Class Implementing the Generic Handler InterfaceThe GenericHandler interface is: javax.xml.rpc.handler.GenericHandler Code Sample: Intercept HandlerThe following code illustrates an example of implementing a generic handler.
Compile your intercept handler into a JAR file.The steps are to compile your intercept handler and JAR the class file. Define a Configuration FileThe configuration file specifies the handler chain and the order in which the handlers will be invoked.
The following is an example of the handler chain configuration. The handler-class attribute specifies the fully-qualified name of the Code Sample: Handler Chain Configuration<weblogic-wsee-clientHandlerChain xmlns="http://www.bea.com/ns/weblogic/90" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:j2ee="http://java.sun.com/xml/ns/j2ee"> <handler> <j2ee:handler-name>sampleHandler</j2ee:handler-name> <j2ee:handler-class>WShandler.WShandler</j2ee:handler-class> <j2ee:init-param> <j2ee:param-name>ClientParam1</j2ee:param-name> <j2ee:param-value>value1</j2ee:param-value> </j2ee:init-param> </handler> </weblogic-wsee-clientHandlerChain> Define the Interceptor ConfigurationIn your ALDSP application, define the interceptor configuration for the method in the data service to which you want to attach the handler. Code Sample: Intercept Configurationdatasrvc:Intercept Configuration In the attached file the aliasName attribute specifies the name of the handler chain to be invoked and the fileName attribute specifies the location of the configuration file. Concluding Actions
|
![]() |
Document generated by Confluence on Apr 28, 2008 15:54 |